USE [xRepair]
GO

/****** Object:  StoredProcedure [dbo].[AddNewBrand]    Script Date: 2/22/2014 8:57:30 PM ******/
DROP PROCEDURE [dbo].[AddNewBrand]
GO

/****** Object:  StoredProcedure [dbo].[AddNewBrand]    Script Date: 2/22/2014 8:57:30 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[AddNewBrand]
		 @GenericTypesID	    INT
		,@BrandName				NVARCHAR(200)
		,@CreatedAt				DATETIME = NULL
		,@CreatedBy				NVARCHAR(50)
		,@NewIdentity			INT = NULL OUTPUT
AS
BEGIN

	SET NOCOUNT ON;
	
	INSERT INTO [dbo].[Brand]
           ([GenericTypesID]
		   ,[BrandName]
		   ,[IsActive]
           ,[CreatedAt]
           ,[CreatedBy]
           )
     VALUES
           (@GenericTypesID
           ,@BrandName
           ,1
           ,@CreatedAt
           ,@CreatedBy
           )

	SELECT @NewIdentity = @@IDENTITY

END



GO


